﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetworkEasyShare {
    public class Transfer {

        // Remote host
        private string mHostAddr;
        private int mHostPort;

        // File
        private string mName;
        private string mFullname;
        private long mSize;
        private string mType;

        public Transfer(string fullname, string name, long size, string type) {
            mFullname = fullname;
            mName = name;
            mSize = size;
            mType = type;
        }

        public Transfer(string hostAddr, int hostPort, string fullname, 
                        string name, long size, string type) {

            mHostAddr = hostAddr;
            mHostPort = hostPort;

            mFullname = fullname;
            mName = name;
            mSize = size;
            mType = type;
        }

        public void setHostAddr(string host) {
            mHostAddr = host;
        }

        public void setHostPort(int port) {
            mHostPort = port;
        }
        
        /// <summary>
        /// Get host address
        /// </summary>
        public string HostAddr
        { get { return mHostAddr; } }

        /// <summary>
        /// Get file name
        /// </summary>
        public int HostPort
        { get { return mHostPort; } }

        /// <summary>
        /// Get file name
        /// </summary>
        public string Fullname
        { get { return mFullname; } }

        /// <summary>
        /// Get file fullname
        /// </summary>
        public string Name
        { get { return mName; } }

        /// <summary>
        /// Get file size
        /// </summary>
        public long Size
        { get { return mSize; } }

        /// <summary>
        /// Get file type
        /// </summary>
        public string Type
        { get { return mType; } }
    }
}
